export default {
    namespaced: true,
    state: {
        user: { name: 'xiaoming'}
    },
    mutations: {
        setUser(state, payload) {
            state.user = payload
        }
    },
    actions: {
        setUser({commit}, payload) {
            commit('setUser', payload)
        }
    }
}